1. Field of the Invention
The present invention relates to an interpolation method for a binary image, and more particularly, to an improved interpolation method in which a variable threshold value used for determining a pixel value to be generated by interpolation is determined according to a context (the state value of adjacent pixels). This invention has been adopted in ISO/IEC JTC1/SC29/WG11 N1903 (ISO/IEC 14496-2 Subpart 7 Committee Draft.
2. Description of the Related Art
Recently, a function for processing shape information has been added to MPEG-4. The shape information, which refers to object information of the image, is expressed as a binary image. To code such a binary image, MPEG-4 adopts a content-based arithmetic encoder (CAE). For lossy shape coding a down sampling method and an upsampling method are performed in each shape macro block. A shape image is divided into shape blocks which have Mxc3x97M block size.
The down sampling refers to a method for reducing the binary image block according to a given conversion ratio. The reduced image block is transmitted together with the conversion ratio. Here, the conversion ratio is determined such that an error between the original binary image block and an binary image block restored later is within a predetermined range.
The reduced image block obtained by the down sampling is coded by a context based arithmetic encoder (CAE) and then transmitted.
The up sampling method is used to restore such a reduced image block. Up sampling is for restoring the reduced image block into the original binary image, by interpolation.
In such an up sampling process, an effective interpolation method must not cause excessive blocking and smoothing effects in the restored binary image.
To satisfy the above requirement, it is an object of the present invention to provide an improved interpolation method in which a context (state value of pixels adjacent to a pixel (interpolated pixel) generated by interpolation) is used for interpolation, thereby reducing blocking and smoothing effects.
To achieve the above object, there is provided an interpolation method for a binary image, for restoring a reduced binary image, reduced from an original binary image by down sampling, into the original binary image, the method comprising the steps of: (a) calculating an interpolation value based on the pixel values (object pixel values) of the reduced image around an interpolated pixel; (b) calculating a context CP(a state value of pixels (reference pixels) around the object pixels); (c) obtaining a threshold value corresponding to the calculated context; and (d) comparing the interpolation value with the threshold value of the step (c), and setting the pixel value of the interpolated pixel as xe2x80x9c1xe2x80x9d if the interpolation value is greater than the threshold value, and setting the pixel value of the interpolated pixel as xe2x80x9c0xe2x80x9d if the interpolation value is equal to or less than the threshold value.
The invention may be embodied in a general purpose digital computer that is running a program from a computer usable medium including but not limited to storage media such as magnetic storage media (e.g., ROM""s, floppy disks, hard disks, etc.), optically readable media (e.g., CD-ROMs, DVDs, etc.), hybrid formats (magneto optical disks) and carrier waves (e.g., transmissions over the Internet). For instance, a part of the present invention can be computer usable medium having computer readable program code means embodied therein for processing by a machine for restoring a reduced binary image, reduced from an original binary image by down sampling, into the original binary image, the computer program being executable by the machine to perform the following steps:
(a) calculating an interpolation value based on the pixel values of pixels (object pixels) around an interpolated pixel;
(b) calculating a context CP(a state value of pixels (reference pixels) around the object pixels);
(c) obtaining a threshold value corresponding to the calculated context; and
(d) comparing the interpolation value with the threshold value of the step (c), and setting the pixel value of the interpolated pixel as xe2x80x9c1xe2x80x9d if the interpolation value is greater than the threshold value, and setting the pixel value of the interpolated pixel as xe2x80x9c0xe2x80x9d if the interpolation value is equal to or less than the threshold value.